<?php

class Create_Jijaf_Users {

	/**
	 * Make changes to the database.
	 *
	 * @return void
	 */
	public function up()
	{
        Schema::create('jijaf_users', function($table){
            $table->increments('id');
            $table->string('username', 128);
            $table->unique('username');
            $table->string('fullname', 128)->nullable();
            $table->string('email', 255)->nullable();
            $table->unique('email');
            $table->string('password', 128);
            $table->timestamps();
        });

        DB::table('jijaf_users')->insert(array(
            'username'      => 'admin',
            'password'      => Hash::make('jijaf'),
        ));
	}

	/**
	 * Revert the changes to the database.
	 *
	 * @return void
	 */
	public function down()
	{
        Schema::drop('jijaf_users');
	}

}
